.class final Lorg/microemu/microedition/ImplFactory$1;
.super Ljava/lang/Object;
.source "ImplFactory.java"

# interfaces
.implements Ljava/security/PrivilegedExceptionAction;


# instance fields
.field private final this$0:Lorg/microemu/microedition/ImplFactory;

.field private final val$implClassName:Ljava/lang/String;


# direct methods
.method constructor <init>(Lorg/microemu/microedition/ImplFactory;Ljava/lang/String;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 128
    iput-object p1, p0, Lorg/microemu/microedition/ImplFactory$1;->this$0:Lorg/microemu/microedition/ImplFactory;

    iput-object p2, p0, Lorg/microemu/microedition/ImplFactory$1;->val$implClassName:Ljava/lang/String;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public run()Ljava/lang/Object;
    .locals 5
    .annotation system Ldalvik/annotation/Throws;
        value = {
            Ljava/lang/ClassNotFoundException;,
            Ljava/lang/InstantiationException;,
            Ljava/lang/IllegalAccessException;
        }
    .end annotation

    .prologue
    .line 130
    sget-object v2, Lorg/microemu/microedition/ImplFactory;->class$org$microemu$microedition$ImplFactory:Ljava/lang/Class;

    if-nez v2, :cond_0

    const-string v2, "org.microemu.microedition.ImplFactory"

    invoke-static {v2}, Lorg/microemu/microedition/ImplFactory;->class$(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v2

    sput-object v2, Lorg/microemu/microedition/ImplFactory;->class$org$microemu$microedition$ImplFactory:Ljava/lang/Class;

    :goto_0
    invoke-virtual {v2}, Ljava/lang/Class;->getClassLoader()Ljava/lang/ClassLoader;

    move-result-object v2

    iget-object v3, p0, Lorg/microemu/microedition/ImplFactory$1;->val$implClassName:Ljava/lang/String;

    invoke-virtual {v2, v3}, Ljava/lang/ClassLoader;->loadClass(Ljava/lang/String;)Ljava/lang/Class;

    move-result-object v1

    .line 132
    .local v1, implClass:Ljava/lang/Class;
    const/4 v2, 0x0

    :try_start_0
    invoke-virtual {v1, v2}, Ljava/lang/Class;->getConstructor([Ljava/lang/Class;)Ljava/lang/reflect/Constructor;
    :try_end_0
    .catch Ljava/lang/NoSuchMethodException; {:try_start_0 .. :try_end_0} :catch_0

    .line 136
    invoke-virtual {v1}, Ljava/lang/Class;->newInstance()Ljava/lang/Object;

    move-result-object v2

    return-object v2

    .line 130
    .end local v1           #implClass:Ljava/lang/Class;
    :cond_0
    sget-object v2, Lorg/microemu/microedition/ImplFactory;->class$org$microemu$microedition$ImplFactory:Ljava/lang/Class;

    goto :goto_0

    .line 133
    .restart local v1       #implClass:Ljava/lang/Class;
    :catch_0
    move-exception v0

    .line 134
    .local v0, e:Ljava/lang/NoSuchMethodException;
    new-instance v2, Ljava/lang/InstantiationException;

    new-instance v3, Ljava/lang/StringBuffer;

    invoke-direct {v3}, Ljava/lang/StringBuffer;-><init>()V

    const-string v4, "No default constructor in class "

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v3

    iget-object v4, p0, Lorg/microemu/microedition/ImplFactory$1;->val$implClassName:Ljava/lang/String;

    invoke-virtual {v3, v4}, Ljava/lang/StringBuffer;->append(Ljava/lang/String;)Ljava/lang/StringBuffer;

    move-result-object v3

    invoke-virtual {v3}, Ljava/lang/StringBuffer;->toString()Ljava/lang/String;

    move-result-object v3

    invoke-direct {v2, v3}, Ljava/lang/InstantiationException;-><init>(Ljava/lang/String;)V

    throw v2
.end method
